package com.muyan.controller;

import com.muyan.producer.MsgProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: YLTDMenglc
 * @Date: 2019/6/20
 * @Time: 13:49
 * @Description:
 */
@RestController
public class MQProducerController {

    @Autowired
    private MsgProducer msgProducer;

    @RequestMapping("/sendMsg")
    public String sendMsg(String queueName){
        msgProducer.send(queueName);
        return "success";
    }
}
